<?php
if(!isset($_REQUEST['report']) || !isset($_REQUEST['cid']) || !isset($_REQUEST['path'])) die('Invalid usage - missing param');
$cid = $_REQUEST['cid'];
$path = $_REQUEST['path'];
$report = $_REQUEST['report'];

define('CID', $cid);
define('READ_ONLY_SESSION',true);
require_once('../../../include.php');
ModuleManager::load_modules();

$status = Module::static_get_module_variable($path, 'status', null);

$records = SCTV_RequirementCommon::get_report_status($status);

if ($status===null || $records === null) {
	die('Invalid usage - missing param');
}
SCTV_ReportsCommon::export_excel($report, $records);
?>
